#encoding:utf8

"""
@decorators for todo
"""


def TODO(status=0, logger=None):
    """
    status = 0 :: need to change
    status = 1 :: finished
    """
    if not logger:
        logger = _logger

    def wrap(func):
        def _wrap(*args, **kwargs):
            if status == 0:
                logger.warn("Function [{}] are not changed".format(func.func_name))
            if status == 1:
                logger.info("function [{}] is modified".format(func.func_name))

            return func(*args, **kwargs)
        return _wrap
    return wrap


class _logger(object):
    @staticmethod
    def info(s):
        print(s)
    warn=info


def test():
    @TODO()
    def f():
        print("get htere")

    f()


if __name__ == "__main__":
    test()




